package cn.maiyar.redis.properties;

import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * 缓存配置
 *
 * @author c.c
 */
@Setter
@Getter
public class CacheManagerProperties {

    private List<CacheConfig> configs;

    /**
     * 默认全局过期时间(分钟)
     */
    private long defaultTime = 30L;

    @Data
    @NoArgsConstructor
    public static class CacheConfig {
        /**
         * cache key
         */
        private String key;
        /**
         * 过期时间，sec
         */
        private long second = 180;
    }
}
